package com.dzh.dzhhub.util.constants;

/**
 * @author: hxy
 * @description: 通用常量类, 单个业务的常量请单开一个类, 方便常量的分类管理
 * @date: 2017/10/24 10:15
 */
public class Constants {

	public static final String SUCCESS_CODE = "100";
	public static final String SUCCESS_MSG = "请求成功";

	/**
	 * session中存放用户信息的key值
	 */
	public static final String SESSION_USER_INFO = "userInfo";
	public static final String SESSION_USER_PERMISSION = "userPermission";

	/**
	 * redis过期时间，以秒为单位，一分钟
	 */
	public static final int EXRP_MINUTE = 60;

	/**
	 * redis过期时间，以秒为单位，一小时
	 */
	public static final int EXRP_HOUR = 60 * 60;

	/**
	 * redis过期时间，以秒为单位，一天
	 */
	public static final int EXRP_DAY = 60 * 60 * 24;

	/**
	 * redis-key-前缀-shiro:cache:
	 */
	public static final String PREFIX_SHIRO_CACHE = "shiro:cache:";

	/**
	 * redis-key-前缀-shiro:access_token:
	 */
	public static final String PREFIX_SHIRO_ACCESS_TOKEN = "shiro:access_token:";

	/**
	 * redis-key-前缀-shiro:refresh_token:
	 */
	public static final String PREFIX_SHIRO_REFRESH_TOKEN = "shiro:refresh_token:";

	/**
	 * JWT-account:
	 */
	public static final String ACCOUNT = "account";

	/**
	 * JWT-currentTimeMillis:
	 */
	public static final String CURRENT_TIME_MILLIS = "currentTimeMillis";

	/**
	 * PASSWORD_MAX_LEN
	 */
	public static final Integer PASSWORD_MAX_LEN = 8;

}
